#ifndef DATABASECONNECTOR_H
#define DATABASECONNECTOR_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlError>
#include <QFile>

class DatabaseConnector : public QObject
{
    Q_OBJECT
public:
    QSqlDatabase db;
    explicit DatabaseConnector(QObject *parent = 0);
    void setDb_user (QString input);
    void setDb_pass (QString input);
    void setDb_host (QString input);
    void setDb_port (int input);
    void setDb_type (QString input);
    QString getDb_user (void);
    QString getDb_pass (void);
    QString getDb_host (void);
    int getDb_port (void);
    QString getDb_type (void);
    bool connectNow( void );
    bool disconnectNow( void );
    QSqlError lastError( void );



private:
    QString db_user;
    QString db_pass;
    // Host can be file for sqllite, too
    QString db_host;
    int db_port;
    QString db_type;
    
signals:
    
public slots:
    
};

#endif // DATABASECONNECTOR_H
